package com.small.base.qiniu;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.Properties;

/**
 * QiniuProperties
 *
 * @author miajio
 */
@ConfigurationProperties(
        prefix = "small.qiniu"
)
public class QiniuProperties {

    private Properties properties = new Properties();

    public QiniuProperties() {}

    public Properties getProperties() {
        return this.properties;
    }

    /**
     * 获取七牛云分配的access key
     */
    public String getAccessKey() {
        return this.properties.getProperty("accessKey");
    }
    /**
     * 设置七牛云分配的access key
     */
    public void setAccessKey(String accessKey) {
        this.properties.setProperty("accessKey", accessKey);
    }
    /**
     * 获取七牛云分配的secret key
     */
    public String getSecretKey() {
        return this.properties.getProperty("secretKey");
    }
    /**
     * 设置七牛云分配的secret key
     */
    public void setSecretKey(String secretKey) {
        this.properties.setProperty("secretKey", secretKey);
    }

    /**
     * 设置存储区域
     * 华东   huadong
     * 华北   huabei
     * 华南   huanan
     * 北美   beimei
     * 东南亚 xinjiapo
     * @param region
     */
    public void setRegion(String region) {
        this.properties.setProperty("region", region);
    }

    /**
     * 设置存储区域
     * 华东   huadong
     * 华北   huabei
     * 华南   huanan
     * 北美   beimei
     * 东南亚 xinjiapo
     */
    public String getRegion() {
        return this.properties.getProperty("region");
    }
}
